﻿using System;
using System.Collections.Generic;

namespace HYElectricSetting
{
	public class WireConduitData
	{
		public WireConduitData(string wireType, string conduitType)
		{
			this.WireTypeName = wireType;
			this.ConduitTypeName = conduitType;
			this.WireConduitSet = new Dictionary<double, int>();
		}

		public WireConduitData(WireConduitData other)
		{
			bool flag = other != null;
			if (flag)
			{
				this.WireTypeName = other.WireTypeName;
				this.ConduitTypeName = other.ConduitTypeName;
				this.WireConduitSet = new Dictionary<double, int>();
				foreach (KeyValuePair<double, int> keyValuePair in other.WireConduitSet)
				{
					this.WireConduitSet.Add(keyValuePair.Key, keyValuePair.Value);
				}
			}
		}

		public string WireTypeName { get; set; }

		public string ConduitTypeName { get; set; }

		public Dictionary<double, int> WireConduitSet { get; set; }

		public void WireConduitSorted()
		{
			SortedDictionary<double, int> sortedDictionary = new SortedDictionary<double, int>(this.WireConduitSet);
			this.WireConduitSet.Clear();
			foreach (KeyValuePair<double, int> keyValuePair in sortedDictionary)
			{
				this.WireConduitSet.Add(keyValuePair.Key, keyValuePair.Value);
			}
		}

		public override string ToString()
		{
			return this.ConduitTypeName;
		}
	}
}
